package com.neouton.crm.managerReceiptRecord.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.managerReceiptRecord.entity.ManagerReceiptRecord;
import com.neouton.crm.managerReceiptRecord.entity.ManagerReceiptTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ManagerReceiptMapper {


    void saveManagerReceiptRecord(@Param("vo") ManagerReceiptRecord managerReceiptRecord);

    IPage<ManagerReceiptRecord> queryManagerReceiptRecordsListInfo(@Param("page")IPage<ManagerReceiptRecord> page, @Param("entity")ManagerReceiptRecord managerReceiptRecord, @Param("userList")List<SysUserEntity> userList);

    List<ManagerReceiptRecord> queryManagerReceiptRecord(@Param("vo")ManagerReceiptRecord managerReceiptRecord);

    List<ManagerReceiptRecord> queryManagerReceiptRecordedMoneyHistory(@Param("vo")ManagerReceiptRecord managerReceiptRecord);

    ManagerReceiptRecord queryManagerReceiptRecordByID(@Param("receiptRecordsId")Integer managerReceiptRecordId);

    void backUpManagerReceiptRecord(@Param("receiptRecordsId")Integer receiptRecordsId, @Param("backUserId")Integer userId);

    void updateManagerReceiptRecordById(@Param("vo")ManagerReceiptRecord entity);

    ManagerReceiptRecord queryManagerReceiptRecordHistory(Integer approvalId);

    List<ManagerReceiptTable> queryReceiptTablesByIdAndPlanPeriod(@Param("vo")ManagerReceiptTable entity);

    void updateReceiptTableDataById(@Param("List")List<ManagerReceiptTable> list, @Param("receiptRecordsId")Integer receiptRecordsId);

    List<ManagerReceiptTable> queryReceiptTablesByApprovalId(Integer approvalId);

    void updateReceiptTableData(@Param("List")List<ManagerReceiptTable> list, @Param("approvalId")Integer approvalId);

    void backUpReceiptTable(@Param("receiptRecordsId")Integer receiptRecordsId,@Param("backUserId")Integer userId);

    List<ManagerReceiptRecord> queryReceiptRecordsListInfo(@Param("entity")ManagerReceiptRecord entity, @Param("userList")List<SysUserEntity> userList);

    Boolean deleteReceiptRecordById(Integer receiptRecordsId);
}
